<?php

 /**
  * @package JooS
  * @subpackage Syntax
  */

  require_once "JooS/Syntax/Complex/Transition.php";

 /**
  * Number ::= Digits , [ ".", Digits ];
  **/
  class JooS_Syntax_Common_Number extends JooS_Syntax_Complex_Transition {
    /**
     *
     * @return JooS_Syntax_Complex_Concatenate
     */
    protected function createRule() {
      return $this->createSyntax("Complex_Concatenate", array(
        $this->createSyntax("Complex_Repetition", $this->createSyntax("Simple_Symbol", "-"), 1), 
        $this->createSyntax("Common_Digits"), 
        $this->createSyntax("Complex_Choose", array(
          $this->createSyntax("Complex_Repetition", $this->createSyntax("Complex_Concatenate", array(
            $this->createSyntax("Simple_Symbol", "."), 
            $this->createSyntax("Common_Digits")
          )), 1, 1), 
          $this->createSyntax("Simple_None")
        ))
      ));
    }
  }
